package com.ddwl.schema.bo.goods.bargain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.Instant;

/**
 * @Author hemiaojun
 * @Date 2021/5/25 14:52
 */
@Getter
@Setter
@ApiModel("五八马助力活动修改Bo")
public class WbmBoostActivityUpdateBo {

    @NotNull(message = "id不能为空")
    @ApiModelProperty("id")
    private String id;

    @ApiModelProperty(value="是否开启商家配送：0否，1是")
    private Integer localDeliveryTag;

    @ApiModelProperty("是否开启物流配送：0否，1是")
    private Integer logisticsTag;

    @ApiModelProperty("是否开启自提：0否，1是")
    private Integer selfMentionTag;

    @ApiModelProperty(value = "活动名称", hidden = true)
    private String name = "助力活动";

    @NotEmpty(message = "店铺id不能为空")
    @ApiModelProperty("店铺id")
    private String shopId;

    @NotNull(message = "活动开始时间不能为空")
    @ApiModelProperty("活动开始时间")
    private Instant startTime;

    @NotNull(message = "活动结束时间不能为空")
    @ApiModelProperty("活动结束时间")
    private Instant endTime;

    @ApiModelProperty(value = "帮砍模式，0：随机金额，1：固定帮砍人数",hidden = true)
    private Integer chopType = 1;

    @ApiModelProperty(value = "新用户模式是否开启 0：不开启，1：开启",hidden = true)
    private Integer newUserMode = 0;

    @NotNull(message = "助力人数不能为空且不能小于1")
    @Min(value = 1, message = "助力人数不能小于1")
    @ApiModelProperty("助力人数")
    private Integer chopNum;

    @ApiModelProperty(value = "砍价有效期 单位：小时",hidden = true)
    private Integer expireHour = 24;

    @ApiModelProperty("商品id")
    private String itemId;

    @ApiModelProperty("商品名称")
    private String itemName;

    @ApiModelProperty("商品价格")
    private BigDecimal itemPrice;

    @NotNull(message = "低价不能为空")
    @ApiModelProperty("底价")
    private BigDecimal thresholdPrice;

    @Valid
    @NotNull(message = "商品规格不能为空")
    @ApiModelProperty(value = "助力商品skuBo",required = true)
    private BargainSkuAddBo bargainSkuAddBo;


}
